{% extends 'registration/registration_base.html' %}
{% load humanize %}
{% load widget_tweaks %}
{% load firecares_tags %}


{% block meta_title %}Registration Check · FireCARES{% endblock %}

{% block meta_description %}
Create an account on FireCARES to learn how fire department resources are deployed to match your community risks.
{% endblock %}

{% block content %}
<div class="col-md-6">
    <div class="ct-headerText--normal">
        <h2 class="text-uppercase ct-fw-600 ct-u-marginBottom20">
            <span class="ct-u-text--motive">FireCARES</span> registration
        </h2>
        <p>
            Though anyone may request and receive an account on FireCARES to view publicly available information,
            only IAFC members, IAFF Affiliate Officers and/or designated Fire Service Leaders may receive login to the full system.
        </p>
        <p>
            <strong>IAFF Local Officers should login to FireCARES using
                <a href="{{ global_settings.IMIS_SSO_LOGIN_URL }}{% absurl 'imis' %}?next={% url 'firestation_home' %}" class="underlined-link">IMIS</a>
                and IAFC Members should use the <a href="{% url 'oauth_redirect' %}" class="underlined-link">Helix</a>
                single-sign-on service.
            </strong>
        </p>
        <p>
            In addition to these active fire service groups, specific fire service industry email address domains allow for automatic
            registration. If your email address does not receive immediate login, you should contact your local Fire Department Chief
            to request an account.
        </p>
    </div>
</div>
<div class="col-md-6">
    <form role="form" name="preForm" class="ct-formRegister pull-right-md" method="post" action="{% url 'account_request' %}" ng-app="fireStation">
        {% csrf_token %}
        <div class="form-group">
            <div class="ct-form--label--type2">
                <div class="ct-u-displayTableVertical">
                    <div class="ct-u-displayTableCell">
                        <div class="ct-input-group-btn">
                            <button class="btn btn-primary">
                                <i class="fa fa-user"></i>
                            </button>
                        </div>
                    </div>
                    <div class="ct-u-displayTableCell text-center">
                        <span class="text-uppercase">Register for FIRECARES</span>
                    </div>
                </div>
            </div>
            {% with WIDGET_ERROR_CLASS='form-error' %}
            <div class="ct-form--item ct-u-marginBottom20 form-group">
                <label>Your Email</label>
                <input type="hidden" name="department" value="{{ request.GET.department }}"/>
                {% render_field form.email type="email" required="required" class+="form-control input-lg no-invalid" ng-model="input" %}
                {{ form.email.errors }}
            </div>
            {{ form.non_field_errors }}
            {% endwith %}
            <div class="ct-form--item">
                <button type="submit" class="btn btn-warning center-block" ng-disabled="preForm.$invalid || preForm.$pristine">Check registration</button>
            </div>
        </div>
    </form>
</div>
{% endblock %}
